package com.iis.hrms.persistence;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigInteger;
import java.sql.Time;
import java.util.List;

/**
 * The persistent class for the night_overtime database table.
 */
@Entity
@Table(name = "night_overtime")
@NamedQueries({
        @NamedQuery(name = "NightOvertime.findAll", query = "SELECT n FROM NightOvertime n"),
        @NamedQuery(name = "NightOvertime.findById", query = "SELECT n FROM NightOvertime n WHERE n.id = :id"),
        @NamedQuery(name = "NightOvertime.findByDescription", query = "SELECT n FROM NightOvertime n WHERE n.description = :description"),
        @NamedQuery(name = "NightOvertime.findByStartTime", query = "SELECT n FROM NightOvertime n WHERE n.startTime = :startTime"),
        @NamedQuery(name = "NightOvertime.findByEndTime", query = "SELECT n FROM NightOvertime n WHERE n.endTime = :endTime"),
        @NamedQuery(name = "NightOvertime.findByPrice", query = "SELECT n FROM NightOvertime n WHERE n.price = :price")})
public class NightOvertime implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(unique = true, nullable = false)
    private String id;

    @Column(nullable = false, length = 255)
    private String description;

    @Column(name = "end_time")
    private Time endTime;

    @Column(nullable = false)
    private BigInteger price;

    @Column(name = "start_time", nullable = false)
    private Time startTime;

    // bi-directional many-to-one association to OvertimeHourRule
    @OneToMany(mappedBy = "nightOvertime")
    private List<OvertimeHourRules> overtimeHourRules;

    public NightOvertime() {
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Time getEndTime() {
        return this.endTime;
    }

    public void setEndTime(Time endTime) {
        this.endTime = endTime;
    }

    public BigInteger getPrice() {
        return this.price;
    }

    public void setPrice(BigInteger price) {
        this.price = price;
    }

    public Time getStartTime() {
        return this.startTime;
    }

    public void setStartTime(Time startTime) {
        this.startTime = startTime;
    }

    public List<OvertimeHourRules> getOvertimeHourRules() {
        return this.overtimeHourRules;
    }

    public void setOvertimeHourRules(List<OvertimeHourRules> overtimeHourRules) {
        this.overtimeHourRules = overtimeHourRules;
    }

}